Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase precision to 2 digits (2.3% => 2.34%) #716

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

tomap
Copy link
Contributor

@tomap tomap commented Dec 10, 2024

2 numbers makes a difference for large code base
(Usefull in Gitlab where you can check coverage before validating a Merge Request)

See https://docs.gitlab.com/ee/ci/testing/code_coverage.html#test-coverage-examples
Can be up to 2 digits

2 numbers makes a difference for large code base
(Usefull in Gitlab where you can check coverage before validating a Merge Request)
@danielpalme
Copy link
Owner

Thanks for your PR. I will take care of it as soon as possible.

@danielpalme danielpalme merged commit e4757cc into danielpalme:main Dec 21, 2024
6 checks passed
@danielpalme
Copy link
Owner

I merged you PR but made some adjustments.
The coverage quotas had a fixed number of digits .ToString("f1"). You incremented to .ToString("f2").

There already was a setting which let's you control the number of digits. But it was not respected in the TextSummary report.

With the next release you can use the command line parameter: settings:maximumDecimalPlacesForCoverageQuotas=2 to achieve the desired output.
See also: https://github.com/danielpalme/ReportGenerator/wiki/Settings

I will publish a new release within the next days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants